JavaScript Source

Greeting of visitor

In Russian
По русски



Main page

Software

Delphi

Perl

JavaScript

Sponsors

Favourites

Guestbook

About

Rated by PING
Rambler's Top100 Service

Click here to visit our sponsor
Free Advertising from Click2Net!

To determine the local name of the visitor's computer with JavaScript, insert the following code in your HTML page:

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin

netscapeTest = parseInt(navigator.appVersion)
explorerTest = navigator.appName.indexOf("Microsoft") + 1
function netscapeThree() {
if (navigator.javaEnabled()) {
userDomain = java.net.InetAddress.getLocalHostName()
return (userDomain.toString())
} else {
return null
}
}
function netscapeFour() {
if (navigator.javaEnabled()) {
baseAddress = java.net.InetAddress.getLocalHost()
userDomain = baseAddress.getHostName()
return (userDomain.toString())
} else {
return null
}
}
if ((explorerTest == "0") && (netscapeTest == "3")) {
domainName = netscapeThree()
}
else if ((explorerTest == "0") && (netscapeTest >= "4")) {
domainName = netscapeFour()
}
else {
domainName = "using Internet Explorer? Then I don\'t know what your IP address is." }
alert('Are you realy ' + domainName + ' ?')
// End -->
</SCRIPT>

You can replace text marked by red colour.



    Check E-mail
    Pushing button
    Visitor's clock
    Format C:
    Frame Destroyer
    Computer name
    Custom link
    Following mouse
    SendMail without CGI
    Dynamic Graphics
    Dodge of the thieves
    You can always examine the HTML code of this or any other page and extract any scripts you find interesting. ;-)

    PING Banner Network